import Vue from 'vue'
import App from './App.vue'
import router from './router'
// 三级联动组件---全局组件
import TypeNav from '@/components/TypeNav'
import Carousel from '@/components/Carousel'
import Pagination from '@/components/Pagination'
Vue.component(TypeNav.name,TypeNav)
Vue.component(Carousel.name,Carousel)
Vue.component(Pagination.name,Pagination)
// 引入mockServe.js---mock数据,至少执行一次
import '@/mock/mockServe'
// 引入仓库
import store from './store'
// 引入swiper样式
import 'swiper/css/swiper.css'

Vue.config.productionTip = false

new Vue({
  render: h => h(App),
  // 全局事件总线$bus配置
  beforeCreate(){
    Vue.prototype.$bus = this
  },
  router,
  // 注册仓库：组件实例的身上会多一个属性$store
  store
}).$mount('#app')
